package com.shop.cereshop.app.dao.distributor;

import com.shop.cereshop.app.page.order.ShopDistributor;
import com.shop.cereshop.commons.domain.distributor.CereDistributorBuyer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CereDistributorBuyerDAO {
    int insert(CereDistributorBuyer record);

    int insertSelective(CereDistributorBuyer record);

    ShopDistributor findByUserId(@Param("buyerUserId") Long buyerUserId);

    CereDistributorBuyer findByDisAndUser(@Param("distributorId") Long distributorId, @Param("buyerUserId") Long buyerUserId);

    CereDistributorBuyer checkUser(@Param("distributorId") Long distributorId, @Param("buyerUserId") Long buyerUserId);

    void update(CereDistributorBuyer distributorBuyer);

    void updateBuyerData(@Param("buyerUserId") Long buyerUserId, @Param("id") Long id);
}